Variable length coding is well known in the art. The variable length coding is widely employed in various fields including compression of images or image frames etc.
The variable length coding (e.g., Huffman Coding) is a coding method in which frequently appearing symbols are (en)coded using short length (bit length) codes, while the other symbols that do not frequently appear are coded using relatively longer length codes so that the overall length of coded data may be shorter than that of data before coded.
It is well known that there are various variable length coding methods. An exemplary embodiment among the various variable length coding methods will be explained herein with reference to FIG. 1.
FIG. 1 is a diagram provided to explain the conventional variable length coding.
Referring to FIG. 1, when a data set (e.g., D1 to Dn) is specified, an encoding system may determine variable length codes to be applied for the variable length coding of the data set.
Various methods are known that determine the variable length codes corresponding to the data set (e.g., D1 to Dn).
For example, the encoding system m may determine a one-bit code (e.g., 1) as a first code corresponding to a first symbol (e.g., S1) included in the data set (e.g., D1 to Dn), and a two-bit code (e.g., 01) as a second code corresponding to a second symbol (e.g., S2). Further, the encoding system may determine a third, a fourth and a fifth codes (e.g., 001, 0001, 0000) for a third, a fourth and a fifth symbols (e.g., S3, S4 and S5), respectively.
When the variable length codes (e.g., the first code to the fifth code) are determined as described above, the encoding system may obtain encoded code data (e.g., C1 to Cn) by storing each data included in the data set (e.g., D1 to Dn) as corresponding code (e.g., one of first to fifth codes). The encoded code data (e.g., C1 to Cn) is represented by a set of the variable length codes.
The variable length coding is advantageous in that frequently appearing symbols are replaced by relatively shorter-length codes so that it is possible to obtain the code data (e.g., C1 to Cn) in a length that is compressed in comparison with the length of the original data set (e.g., D1 to Dn).
Generally, in the area which is not complicated (“flat area”) of an image (or an image frame), pixels having similar values often consecutively appear. Therefore, when an image is encoded using a predetermined method, in the case of a flat area, probability is high that the frequently appearing symbols consecutively exist together. Further, the frequently appearing symbols may be represented by the codes having a short length when performing the variable length coding. Such a characteristic may appear when encoding various data (e.g., documents, text and the like) as well as an image.
The discussion in this section is only to provide background for the understanding of the invention and does not constitute an admission of prior art.